<template>

    <div class="content">
        <p class="title">content</p>
        <!-- v-button假设是上面定义的组件 -->
        <v-button v-bind="params" v-on="params"></v-button>
    </div>
</template>
<script>
import VButton from '@/components/button.vue'
export default {
    name: '',
    components: {
        VButton
    },
    props: ['content'],
    data() {
        return {
            age: 22,
            params: {
                name: 'lisi',
                age: 23,
                func1: () => {
                    console.log('我是content的age', this.params.age)
                    console.log('我是content的func1')
                },
                func2: () => {
                    console.log('我是content的func2')
                }
            }
        }
    },
    created() {
    },
    mounted() {
        console.log('我是content组件，我获取到的值是', this.content)
    },
    methods: {
        handleFunc1() {
            console.log('我是content组件的handleFunc1')
        }
    },
}

</script>
<style scoped>
.content {
    width: 1200px;
    margin: 0 auto;
}

.content .button {
    border-radius: 10px;
}
</style>
  
  